﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Janus.Cores.XMPP;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using agsXMPP;
namespace Janus.Cores.XMPP.Tests
{
    [TestClass()]
    public class XmppHelperTests
    {
        [TestMethod()]
        public void RegisterTest()
        {
            XmppHelper xmpp = new XmppHelper();
            XmppUserEntity mode = new XmppUserEntity() { OpType = "add", Email = "test@email.com", RealName = "测试", Password = "test", Username = "test" };
            var result = xmpp.Register(mode);
            Assert.IsTrue(result);
        }

        [TestMethod()]
        public void LoginTest()
        {
            XmppHelper xmpp = new XmppHelper();
            xmpp.Login("test", "test");
            if(xmpp.xmppConn.Status=="")
            { 
            //xmpp.SendMsgToSomeBody(new Jid("a1@192.168.2.6"), "testOK?");
            }
            //bool result = xmpp.Login("test", "test");
            //Assert.IsTrue(result);
        }

    }
}
